import pkgutil
import os
from distutils.core import setup

def get_long_desc(): 
    # take the first paragraph of the README
    readme = [line.strip() for line in open('README.md')]
    start = readme.index('') + 1
    end = readme.index('', start)
    return '\n'.join(readme[start: end])


def get_packages():
    return [name for _, name, ispkg in pkgutil.walk_packages(['.']) if ispkg]


setup(name='Ruin',
      version='0.1',
      description='Ruin is yet another vapourware roguelike',
      long_description=get_long_desc(),
      author='Jeffrey Lund',
      author_email='jefflund@gmail.com',
      url='http://ruinrl.blogspot.com/',
      license='New BSD',
      platforms='Any',

      packages=get_packages(),
      package_data={'ruin': ['data/*.dat', 'data/*.ttf',
                             'data/terrain/*.dat',
                             'data/sprite/*.dat', 'data/sprite/*.png']},
      scripts=['ruinrl'],

      classifiers=['Development Status :: 2 - Pre-Alpha',
                   'License :: OSI Approved :: BSD License',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python :: 2.7',
                   'Environment :: X11 Applications',
                   'Environment :: Console :: Curses',
                   'Topic :: Games/Entertainment :: Role-Playing']
    )
